package cn.jee.spring_base;

public HikariConfig config(){
        HikariConfig config = new HikariConfig();
        config.setDriverClassName("org.hsqldb.jdbc.JDBCDriver");
        config.setJdbcUrl("jdbc:hsqldb:hsql://localhost/");
        config.setUsername("sa");
        config.setPassword("");
        config.setMaximumPoolSize(5);
        config.setMinimumIdle(2);
        return config;
        }
@Bean
public HikariDataSource dataSource(){
        HikariDataSource ds = new HikariDataSource(config());
        return ds;
        }